<?php


namespace Part17_AdapterMode\Code2;

/**
 * 外籍中锋
 */
class ForeignCenter
{
    private $name;

    // 此处不用构造方法，来突出和别的类的不一样
    public function setName($name)
    {
        $this->name = $name;
    }

    public function getName()
    {
        return $this->name;
    }

    public function 进攻()
    {
        echo "外籍中锋{$this->name}进攻\n";
    }


    public function 防守()
    {
        echo "外籍中锋{$this->name}防守\n";
    }
}